package com.vint.basic;
/*
 * 排序基本
 */


public class IntegerSort {
    public static int[] sort1(int[] src){
        if(null==src||src.length==1){
            return src;
        }
        for(int i = 0; i < src.length; i++){
            for(int j = i+1; j < src.length; j++){
                if(src[i]<src[j]){
                    int tmp = src[i];
                    src[i] = src[j];
                    src[j] = tmp;
                }

            }
        }
        return src;
    }
    public static void main(String[] args){
        int[] src = {1,3,4,5,2};
        int[] ret = sort1(src);
        System.out.println("success!!");
    }
}
